{% extends 'base.html' %}

{% block content %}

    <!-- Plugins css-->


    <link href="/static/assets/plugins/bootstrap-select/dist/css/bootstrap-select.min.css" rel="stylesheet" />


<div class="container">
        <div class="row ">
                    <div class="col-sm-12">
                        <h4 class="page-title">主机添加</h4>
                        <ol class="breadcrumb">
                            <li>
                                <a href="#">容器管理</a>
                            </li>
                            <li class="active">
                                <a href="{% url 'DockerHosts' %}">主机列表</a>
                            </li>
                        </ol>
                    </div>

            <form class="form-horizontal" role="form" method="POST" action="{% url 'DockerHostAdd' %}">
                    {% csrf_token  %}
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="card-box">
                                <div class="row">
                                    <div class="col-md-12">
                                             <div class="form-group">
                                                <label class="col-md-3 control-label">主机SN关联:</label>
                                                <div class="col-md-6">

                                               <select class="selectpicker show-tick" data-style="btn-white" name="DockerServer">
                                                    {% for s in ServerData %}
                                                            <option value="{{s.id}}">{{s}}</option>
                                                    {%endfor%}
                                                </select>
                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <label class="col-md-3 control-label" for="state-warning">docker主机IP:</label>
                                                <div class="col-md-6">
                                                     {{ data.dockerip}}
								                     {{ data.dockerip.errors}}

                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <label class="col-md-3 control-label" for="state-danger">docker主机port:</label>
                                                <div class="col-md-6">
                                                    {{ data.dockerport}}
								                    {{ data.dockerport.errors}}
                                                    <!--<input type="text" id="state-danger" name="state-danger" class="form-control" placeholder="...">-->
                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">主机状态: </label>
                                                <div class="col-md-6">
                                                   {{data.ServerStatus}}
                                                </div>

                                                <!--


                                                    <select class="selectpicker show-tick" data-style="btn-white">
                                                         <option value="0" >启用</option>
                                                         <option value="1" >禁用</option>
                                                    </select>
                                                </div>-->
                                            </div>

                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                     <!-- 提交按钮 -->
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="form-group text-right">
                                <button type="submit" class="btn btn-primary">
                                    提交
                                </button>
                            </div>
                        </div>
                    </div>
            </form>
         </div>
</div>


<script src="/static/assets/plugins/bootstrap-select/dist/js/bootstrap-select.min.js" type="text/javascript"></script>

{% endblock %}
